package synchronizedTest;

public class DeathSynchorized {
    public static int count = 0;
    static Object link = new Object();
    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(()->{
            synchronized (link) {
                synchronized (link) {
                    for (int i = 0; i < 10000; i++) {
                        count++;
                    }
                }
            }
        });
        t1.start();
        t1.join();
        System.out.println(count);
    }
}
